@import shared.VarTool
@import tool.soft.OplsdaSoft
@import tool.workflow.FeatureSelectionWorkflow
@(missionId: Int)(implicit request: RequestHeader,messages: Messages)
@main(s"${messages("projectDetails")}-" + messages(FeatureSelectionWorkflow.nameStr))("workflowMission", "") {

	<link rel="stylesheet" media="screen" href="@routes.Assets.at("stylesheets/tableFilter.css")">
	<link rel="stylesheet" media="screen" href="@routes.Assets.at("myCss/featureSelection.css")">

	<link rel="stylesheet" media="screen" href="@routes.Assets.at("jquery-minicolors/jquery.minicolors.css")">

	<script src="@routes.Assets.at("bootstrap-table-master/dist/extensions/filter-control/my-bootstrap-table-filter-control.js")" type="text/javascript"></script>

	<script src="@routes.Assets.at("jquery-minicolors/jquery.minicolors.js")" type="text/javascript"></script>
	<script src="@routes.Assets.at("topology/index.js")" type="text/javascript"></script>

	<style>
			.genome-pre {
				white-space: pre-wrap;
				word-wrap: break-word;
				border: 0px solid #ccc;
				background-color: white;
			}

			select:not([multiple]) {
				-webkit-appearance: none;
				-moz-appearance: none;
				background-position: right 50%;
				background-repeat: no-repeat;
				background-image: url();
				padding: .5em;
				padding-right: 1.5em
			}

			.fr {
				float: right;
			}

			.base-info .item .title span {
				display: inline-block;
				border-left: 2px solid #0b8af4;
				font-size: 14px;
				color: #333;
				padding-left: 10px;
			}

			.photo span {
				display: block;
				width: 92px;
				height: 92px;
			}

			.photo img {
				width: 100%;
				height: 100%;
			}

			.fglefttitle {
				font-size: 30px;
				font-weight: lighter;
				color: #A2A2A2;
			}

			#row-main {
				overflow-x: hidden;
			}

			#content {
				transition: width 0.3s ease;
			}

			#sidebar {
				transition: margin 0.3s ease;
			}

			.collapsed {
				display: none;
			}

			.myAddon {
				background-color: white;
				border: 0px;
			}

			.myFc {
				border-radius: 4px !important;
			}

			.has-error .input-group-addon {
				color: #a94442;
				background-color: white;
				border-color: #a94442;
			}

			.eachColor .form-control-feedback {
				top: 0;
				right: 0px !important;
			}

			.has-feedback .form-control {
				padding-right: 35px !important;
			}

			#scoreLayout .diff .form-control-feedback {
				top: 0;
				right: -15px;
			}

			.modal-header {
				cursor: move;
			}

		.myCopy{
			display: inline-block;
			float: right;
			cursor: pointer;
			margin-top: 3px;
		}

			.fade:not(.show) {
				opacity: 0;
			}

			.fade.in {
				opacity: 1;
			}

	</style>
	<div class="page-content">

		<div class="row">

			<div class="col-md-12">
				<div id="form_wizard_1" class="portlet light profile-sidebar-portlet bordered">

					<div class="portlet-title">
						<div class="item">
							<div class="title clear">
								<a href="@routes.WorkflowController.missionManageBefore">@messages("myWorkflowTasks")</a> /
								<a href="@routes.WorkflowController.analysisBefore?kind=@FeatureSelectionWorkflow.nameStr">@messages(FeatureSelectionWorkflow.nameStr)</a>
								/
								<span>@messages("projectDetails")</span>
							</div>
						</div>
						<div class="caption">
						</div>
					</div>

					<div class="portlet-body form">

						<div class="row">

							<div class="col-sm-12">

								<h4>@messages("projectInformation")</h4>

								<form class="form-horizontal" role="form" id="mission">
									<div class="form-body">

										<div class="row">
											<div class="col-md-12">
												<div class="form-group">
													<label class="control-label col-md-2">@messages("taskName"):</label>
													<div class="col-md-4">
														<p class="form-control-static" id="missionName">  </p>
													</div>
												</div>
											</div>
										</div>

										<div class="row">
											<div class="col-md-12">
												<div class="form-group">
													<label class="control-label col-md-2">@messages("moduleUtilized"):</label>
													<div class="col-md-4">
														<p class="form-control-static" id="kind">  </p>
													</div>
													<label class="control-label col-md-2">@messages("taskState"):</label>
													<div class="col-md-4">
														<p class="form-control-static" id="state">  </p>
													</div>
												</div>
											</div>
										</div>

										<div class="row">
											<div class="col-md-12">
												<div class="form-group">
													<label class="control-label col-md-2">@messages("startTime"):</label>
													<div class="col-md-4">
														<p class="form-control-static" id="startTime">  </p>
													</div>
													<label class="control-label col-md-2">@messages("endTime"):</label>
													<div class="col-md-4">
														<p class="form-control-static" id="endTime">  </p>
													</div>
												</div>
											</div>
										</div>

										<div class="row">
											<input hidden name="file">
											<input hidden name="groupFile">
											<div class="col-md-12">
												<div class="form-group">
													<label class="control-label col-md-2">@messages("inputFile"):</label>
													<div class="col-md-10">
														<p class="form-control-static" id="input">  </p>

													</div>
												</div>
											</div>
										</div>

										<div class="row">
											<div class="col-md-12">
												<div class="form-group">
													<label class="control-label col-md-2">@messages("zippedResults"):</label>
													<div class="col-md-4">
														<p class="form-control-static" >
															<a href="@routes.WorkflowController.downloadResult?missionId=@missionId">
																<i class="fa fa-download"></i>
															</a>
														</p>
													</div>
												</div>
											</div>
										</div>

									</div>
								</form>

							</div>

						</div>

						<div class="row" id="workflow" style="display: block">

							<div id="left" class="col-sm-1" style="padding-right: 0px;
								padding-left: 0px;
								width: 17%;">
								<div class="canvas" style="float: left;
									width: 100%">

									<div class="unified-panel-header" unselectable="on">
										<div class="unified-panel-header-inner">
											@messages("diffResult")
											<span title="@messages("copy")" class="myCopy fa fa-copy"></span>
										</div>
									</div>

									<textarea  name="myCopy" style="display: none"></textarea>

									<div class="unified-panel-body" style="margin-top: 5px">
										<div class="toolMenu" style="margin-left: 5px;margin-right: 5px">

											<div id="noDiffResult">
												@messages("noDiffMetabolite")
											</div>

											<div class="table-responsive" >

												<table class="display table table-bordered" id="table" data-pagination="true"
												data-page-list="[10, 25, 50, 100, all]" >
													<thead>

														<tr class="myTr">

														</tr>

													</thead>
												</table>

											</div>


										</div>
									</div>
									<div class="unified-panel-footer">
										<div class="panel-collapse">
											<span class="fa fa-chevron-left"></span>
										</div>
										<div class="drag leftDrag"></div>
									</div>
								</div>
								<div style="" class="leftHandler"></div>
							</div>

							<div class="col-sm-11" id="center" style="padding-left: 0px;
								padding-right: 0px;
								width: 67%;">

								<div class="unified-panel-header" unselectable="on">
									<div class="unified-panel-header-inner">
										@messages("workflow")@messages("clickModulesViewResult")
									</div>
								</div>

								<div class="canvas" id="topo-canvas" style=" "></div>

							</div>

							<div id="right" class="col-sm-1" style="padding-right: 0px;
								padding-left: 0px;
								width: 15%">

								<div style=" " class="rightHandler"></div>

								<div class="canvas" style="">

									<div class="unified-panel-header" unselectable="on">
										<div class="unified-panel-header-inner" style="float: right">
											<button type="button" title="@messages("reRunTheCurrentModule")" disabled="disabled" style="border: 0px;" class="panel-header-button myRemoveButton">

											</button>
										</div>
										<div class="unified-panel-header-inner">
											@messages("parametersUsed")
										</div>
									</div>

									<div class="unified-panel-body">
										<div class="toolMenu" style="margin-top: 15px">

											<div id="args">

											</div>


										</div>
									</div>
									<div class="unified-panel-footer">
										<div class="panel-collapse right">
											<span class="fa fa-chevron-right"></span>
										</div>
										<div class="drag rightDrag"></div>
									</div>
								</div>
							</div>

						</div>

						@user.workflowMission.uniAnaResult(missionId)
						@user.workflowMission.oplsdaResult(missionId)
						@user.workflowMission.plsdaResult(missionId)
						@user.workflowMission.rfResult(missionId)
						@user.workflowMission.svmResult(missionId)
						@user.workflowMission.borutaResult(missionId)
						@user.workflowMission.corResult(missionId)
						@user.workflowMission.pathwayAnaResult(missionId)
						@user.workflowMission.diagnoseAnaResult(missionId)
						@user.workflowMission.fsPreprocessResult(missionId)
						@user.workflowMission.unionResult(missionId)
						@user.workflowMission.intersectResult(missionId)
						@user.workflowMission.pcaResult(missionId)

					</div>

				</div>
			</div>
		</div>

		<div id="viewModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog" style="width: 1000px">
				<div class="modal-content">
					<div class="modal-header bg-primary">
						<h4 class="modal-title">
							<i class="fa fa-eye"></i>
							<span id="lblAddTitle" style="font-weight: bold">@{messages("fileView")}(<span id="fileName"></span>)</span>
						</h4>
						<button type="button" class="close" data-dismiss="modal" aria-hidden="true" >
							<i class="fa fa-remove"></i>
						</button>
					</div>

					<div class="portlet-body form" style="margin-left: 15px;
						margin-right: 15px;
						margin-bottom: 15px">

						<div class="table-responsive" style="margin-top: 10px">

							<table class="display table table-bordered" id="table" data-click-to-select="true"
							data-page-list="[10, 25, 50, 100, all]" >
								<thead>

									<tr class="myTr">

									</tr>

								</thead>
							</table>

						</div>

					</div>

				</div>
			</div>
		</div>

	</div>

	<script>

			var missionId = "@missionId"
			var id = "@request.session.get("id")"

			Header.selectHeader("mission")

			$(function () {
				Tool.fileInput
				FeatureSelectionResult.init

			})
	</script>


}
